package com.hqyj.demo.mapper;

import com.hqyj.demo.entity.Goods;
import com.hqyj.demo.entity.Sale;
import com.hqyj.demo.entity.SaleGoods;
import com.hqyj.demo.entity.vo.PurchaseOrSaleVo;
import java.util.List;

public interface SaleMapper {

    //模糊分页查询
    List<Sale> selectPageLike(PurchaseOrSaleVo saleVo);
    //总记录数
    Integer selectCount();

    //根据ID查询单据详细信息
    Sale selectByID(Integer id);

    //根据时间查询当天入库单据记录数
    Integer byDateCount(String nowDate);

    //保存单据对象
    Boolean saveSale(Sale sale);
    //获取单据表最后一条记录ID
    Integer selectSaleLastId();
    //添加单据商品中间表
    Integer saveSaleGoods(List<SaleGoods> list);
    //批量修改商品库存
    Integer updateGoodsInventoryQuantity(List<Goods> list);
    //单个修改商品库存
    Boolean updateGoodsInventoryQuantityById(Goods goods);
}
